home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / pascal / mystic.zip / PAS2.DOC < prev    next >
Text File  |  1986-02-27  |  12KB  |  344 lines

  1.  
  2.         Mystic Pascal  User Manual                                      12
  3.  
  4.  
  5.         3.  Full Screen Editor
  6.  
  7.              Mystic  Pascal  provides a full screen editor which is  used 
  8.         for  entering,  modifying and inspecting Pascal source  programs.  
  9.         It is not intended for editing other types of files.
  10.  
  11.              You can edit your Pascal program as a text file although the 
  12.         editor stores the program in a "tokenized" format.   A token is a 
  13.         one byte code which can represent an entire Pascal reserved word.  
  14.         For  example,  the  reserved word PROCEDURE uses 9 bytes in  text 
  15.         format  but only one byte in token format.   Obviously a  typical 
  16.         Pascal program can be greatly compressed by using token format.
  17.  
  18.              The  editor converts all identifiers to upper case  when  it 
  19.         stores  them  in  its table.   You can use an  option  switch  to 
  20.         control  whether  reserved words,  standard identifiers and  user 
  21.         defined identifiers are displayed in lower or upper case.  (Refer 
  22.         to   section  4.1  of  this  manual.)    For  example,   the  two 
  23.         identifiers "Initialize" and "INITIALIZE" are treated as the same 
  24.         identifier.
  25.  
  26.              Source  programs  must  not contain lines  greater  than  80 
  27.         characters, the width of the standard display screen.
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.         Section 3:   Full Screen Editor
  58.  
  59.         Mystic Pascal  User Manual                                      13
  60.  
  61.  
  62.         3.1  Loading and Saving Pascal Programs
  63.  
  64.              When you want to work on a Pascal program which is saved  on 
  65.         disk,  you  must load it into Mystic Pascal.   To load a  program 
  66.         from  disk,  go  to  the Editor screen.   (F1 is used  to  switch 
  67.         between  the different screens.)  If you are in the  Editor,  hit 
  68.         F2.  This will display the Editor command menu.  Select command L 
  69.         for load.    You will be asked the name of the file to be loaded.  
  70.         The 3 character filetype must be keyed in with the filename.   It 
  71.         does not assume any default filetype.   A disk letter prefix  may 
  72.         be added to access files not on the current disk drive.
  73.  
  74.              Sample filenames with filetypes:
  75.                   TEST.PAS            c:stock.mdl
  76.                   Startrek.bak        b:Train.set
  77.  
  78.              If the file is not found or there is some other  error,  the 
  79.         error  message  will  be  displayed and you may  then  retry  the 
  80.         operation.
  81.  
  82.              To  save  a  the Pascal program currently  residing  in  the 
  83.         editor is a nearly identical process.  Enter F2, then S, then the 
  84.         filename.filetype.   The filename need not be the same as in  the 
  85.         last Load command.
  86.  
  87.  
  88.  
  89.         3.2  Entering a New Pascal Program
  90.  
  91.              When  Mystic Pascal is first started the editor is empty and 
  92.         a new program may be directly keyed in.  If there is a program in 
  93.         the editor and you wish to enter a new program,  key F2,  then N.  
  94.         This  command clears out the editor.   Any program in the  editor 
  95.         buffer is cleared out of the buffer by the New command.  You  can 
  96.         use the Save command to save such a program first.
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.         Section 3:   Full Screen Editor
  115.  
  116.         Mystic Pascal  User Manual                                      14
  117.  
  118.  
  119.         3.3  Editing Commands
  120.  
  121.              Mystic  Pascal  editing commands are used to modify text  on 
  122.         the CRT screen for the current Pascal program.   Many people  are 
  123.         experienced  with the Wordstar word processing  program.   Mystic 
  124.         Pascal's edit commands are similar to those commands.
  125.  
  126.  
  127.         3.3.1  Cursor Movement Commands
  128.  
  129.         right one character           Control D      right arrow
  130.         left one character            Control S      left arrow
  131.         up one line                   Control E      up arrow
  132.         down one line                 Control X      down arrow
  133.         right one word                Control F      Control right arrow
  134.         left one word                 Control A      Control left arrow
  135.         top of file                   Home
  136.         end of file                   End
  137.         tab                           Tab 
  138.         reverse tab                   Shift Tab
  139.         next line                     return
  140.  
  141.  
  142.         3.3.2  Scroll Commands
  143.  
  144.         scroll up one line            Control Z
  145.         scroll down one line          Control W
  146.         scroll up one page            Control C      PgUp
  147.         scroll down one page          Control R      PgDn
  148.  
  149.  
  150.         3.3.3  Insert and Delete Commands
  151.  
  152.         insert mode toggle            Control V      Ins
  153.         insert new line               Control N      
  154.         delete character              Control G      Del
  155.         destructive backspace         Control H      right arrow key 14
  156.         delete word right             Control T
  157.         delete line                   Control Y
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.         Section 3:   Full Screen Editor
  172.  
  173.         Mystic Pascal  User Manual                                      15
  174.  
  175.  
  176.         3.4  Compiling a Pascal Program
  177.  
  178.              To  compile a Pascal program you must first load it into the 
  179.         editor.   Generally a program you are working on will already  be 
  180.         in the editor.
  181.  
  182.              Once  your  program  is  loaded and you are  in  the  editor 
  183.         screen,  then to compile the program, enter key F2 then letter C.  
  184.         If  the  compile has no errors,  a small window will display  the 
  185.         elapsed  time of the compile and the compiler speed in lines  per 
  186.         second.   The size of the code generated is also displayed.   Hit 
  187.         any key to remove the window.
  188.  
  189.              To compile, enter
  190.  
  191.                   F2   then    C
  192.  
  193.              If  there  is an error during the  compile,  the  cursor  is 
  194.         positioned  at the location of the error (or just past it) in the 
  195.         source program.  An error message is displayed in a small window.  
  196.         Hit any key to remove the window and resume editing.  Correct the 
  197.         error and you can then recompile.
  198.  
  199.  
  200.  
  201.         Technical Notes
  202.  
  203.               Mystic  Pascal  uses an advanced compiler  architecture  to 
  204.         achieve very high compile speed.  The "Lines per second" value is 
  205.         intended  to show the effective compilation speed for  comparison 
  206.         with other compilers.
  207.  
  208.              The  compiler  elapsed time is measured using  the  Personal 
  209.         Computer's  timer tick interrupt which occurs every 0.055  second 
  210.         (18.2  times per second).   If,  by chance,  no timer ticks occur 
  211.         between the start and finish of the compilation,  then the actual 
  212.         time must have been between 0.0 and 0.055 second.   In this case, 
  213.         the elapsed time is adjusted to 0.030 second,  a middle value, to 
  214.         avoid division by zero in computing the lines per second.
  215.  
  216.  
  217.  
  218.         3.5  EXE File Create                                ** 1.6 **
  219.  
  220.              After   a  Pascal  program  has  successfully  compiled,   a 
  221.         standalone  EXE file version of the program may be  created  with 
  222.         the 'E' command on the F2 menu.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.         Section 3:   Full Screen Editor
  229.  
  230.         Mystic Pascal  User Manual                                      16
  231.  
  232.  
  233.         4.  Direct Mode
  234.  
  235.              In the Direct Mode screen,  Pascal statements may be entered 
  236.         directly.   They are instantly compiled, executed and any results 
  237.         displayed.
  238.  
  239.              The  statements are compiled at the global level.   You  can 
  240.         access  all  global variables,  procedures and functions but  not 
  241.         those  declared within a procedure or function.   Each  statement 
  242.         must fit on one line.   Multiple statements may be entered on one 
  243.         line.
  244.  
  245.              The backslash "\" is the